<script src="https://cdn.jsdelivr.net/npm/axios@0.27.2/dist/axios.min.js"></script>

<script>
    axios.get('http://ajax-api.itheima.net/api/province').then(res => {
        const pname = res.data.data[5]
        console.log(pname)
        // 再发请求
        axios.get('http://ajax-api.itheima.net/api/city?pname='+pname).then(res => {
            const cname = res.data.data[0]
            // 再发请求
            axios.get(`http://ajax-api.itheima.net/api/area?pname=${pname}&cname=${cname}`).then(res =>{
                console.log(res)

            })
        })
    })
    
</script>